#ifndef MESHOBJECT_H
#define MESHOBJECT_H

#include <GL/gl.h>
#include <GL/glu.h>

#include <vector>
#include <string>
#include <fstream>
#include <sstream>

#include "Object.h"
#include "ColorTriangle.h"

enum PhysicsModel
{
    NONE,
    SPHERE,
    TRIANGLES
};

class MeshObject : public Object
{
    public:
        MeshObject(std::vector<ColorTriangle>& vect, Vertex3D pos = Vertex3D(0,0,0),Vertex3D vPos = Vertex3D(0,0,0),Vertex3D rot = Vertex3D(0,0,0),Vertex3D vRot = Vertex3D(0,0,0), PhysicsModel physModel = NONE);
        MeshObject(std::string filename, PhysicsModel physModel = NONE);
        virtual ~MeshObject();

        void draw();
        void update();

        void collide(MeshObject* a);

        void setPhysics(PhysicsModel model);
        void setRadius(double r)
        {
            radius = r;
        }

    protected:
    private:
        PhysicsModel physicsModel;
        double radius;
        std::vector<ColorTriangle> mesh;

};

#endif // MESHOBJECT_H
